[herd-www] Add .opam file specifying dependencies#1728
[herd-www] Add .opam file specifying dependencies#1728TiberiuBucur wants to merge 1 commit intoherd:masterfrom
Conversation
There was a problem hiding this comment.
A couple of comments:
-
Let's update CI workflows to use this opam file to solve and install dependencies. Let's also update the
README.mdinherd-wwwto inform the reader of the possibility to doopam install . .. --deps-onlyfrom withinherd-www/to install dependencies. (I thinkopam install . --deps-onlyalone is not sufficient becauseherd-wwwdepends on sources from the coreherdtoolspackage, which has further dependencies.) -
Since
herd-wwwbuilds against sources from the coreherdtoolspackage, it may be worth extendingherd-www.opamto explicitly include the subset of dependencies fromherdtools7.opamthat are required to buildherd-www. This would makeherd-www.opama more complete and declarative description of the dependencies needed to buildherd-www, without relying indirectly on another opam file.
EDIT: I've double-checked in an empty opam switch and indeed just running opam install . --deps-only inside herd-www will miss zarith, which is required to build herdtools' lib/. Since it's a single dependency and we are already requiring zarith_stubs_js anyway, I think we should go with point (2) above and just add zarith to herd-www.opam.
This PR addresses a mismatch between zarith versions >=1.13, required by herdtools7.opam, and zarith_stubs_js, required by herd-www. The oldest version of zarith_stubs_js that does not conflict with zarith 1.13 is v.0.16.1. This version requires Ocaml >=4.14.0.
This .opam file specifies these requirements, giving the user the ability to automatically install the right versions of the packages through
opam install ($OPAM_FILE_PATH) --deps-onlyfor herd-www, such that these will not conflict with the versions required by herdtools7.opam in the root of the repository.